<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:actionerror/>
<s:actionmessage/>
<s:fielderror />
<s:form action="self/changePasswd.do" name="formObj" method="post" id="formObj">
<h1>使用者资讯</h1>
<p><b>旧密码：</b><s:password name="oldPassword"/></p>
<p><b>新密码：</b><s:password name="newPassword"/></p>
<p><b>确认：</b><input type="password" name="confirmPassword"/>(请重覆新密码一次)</p>
<div class="f-link">
	<a href="view.do">取消</a>
	<a href="#" onclick="changePwd()">确认</a>
</div>
</s:form>
<script>
function changePwd() {
	if (document.formObj.oldPassword.value == "" ) {
		alert("请输入旧密码");
		document.formObj.oldPassword.focus();
		return false ;
	}
	if (document.formObj.newPassword.value == "" ) {
		alert("请输入新密码");
		document.formObj.newPassword.focus();
		return false ;
	}
	if (document.formObj.newPassword.value != document.formObj.confirmPassword.value ) {
		alert("新密码与确认密码不符");
		document.formObj.newPassword.focus();
		return false ;
	}
	document.formObj.submit();
}
</script>